﻿namespace Nickel
{

    /// <summary>
    /// Site constant strings
    /// </summary>
    public class Constants
    {

        // Action paths
        public const string ACTION_ACCOUNT = "account/";
        public const string ACTION_READ = "read/";
        public const string ACTION_SEARCH = "search/";
        public const string ACTION_UPLOAD = "upload/";
        public const string ACTION_WRITE = "write/";

        // Date time format
        public const string DATE_TIME_FORMAT = "yyyy-MM-dd hh:mm tt";

        // Field names
        public const string FIELD_ERROR = "error";
        public const string FIELD_PAGE = "page";
        public const string FIELD_SUCCESS = "result";
        public const string FIELD_TITLE = "title";

        // Input field names
        public const string INPUT_ADMIN = "admin";
        public const string INPUT_ARGUMENT = "argument";
        public const string INPUT_ARTICLE_ID = "articleId";
        public const string INPUT_COMMENT = "commentText";
        public const string INPUT_COMMENTS_ENABLED = "commentsEnabled";
        public const string INPUT_DELETE = "delete";
        public const string INPUT_DELETE_PHOTO = "deletePhoto";
        public const string INPUT_DESCRIPTION = "description";
        public const string INPUT_EMAIL = "email";
        public const string INPUT_ENABLED = "enabled";
        public const string INPUT_ID = "id";
        public const string INPUT_INPUT = "input";
        public const string INPUT_KEYWORDS = "keywords";
        public const string INPUT_NAME = "name";
        public const string INPUT_PAGE = "page";
        public const string INPUT_PASSWORD = "password";
        public const string INPUT_PASSWORD_CONFIRM = "passwordConfirm";
        public const string INPUT_PUBLISH = "publish";
        public const string INPUT_SEARCH = "search";
        public const string INPUT_SIGN_IN_EMAIL = "signInEmail";
        public const string INPUT_SIGN_IN_PASSWORD = "signInPassword";
        public const string INPUT_SUBMIT = "submit";
        public const string INPUT_SUBTITLE = "subtitle";
        public const string INPUT_SUBSCRIBE = "subscribed";
        public const string INPUT_TAG_LIST = "tagList";
        public const string INPUT_TAG_SELECT = "tagSelect";
        public const string INPUT_TEXT = "text";
        public const string INPUT_TITLE = "title";
        public const string INPUT_UPLOAD = "upload";
        public const string INPUT_URL = "url";

        // Markup bar
        public const string MARKUP_BAR = "<div id=\"markupBar\">" +
            "<input type=\"button\" onclick=\"addMarkup('" + MARKUP_BOLD + "', '" + Constants.INPUT_TEXT + "');\" value=\"" + Labels.MARKUP_BOLD + "\" /> " +
            "<input type=\"button\" onclick=\"addMarkup('" + MARKUP_ITALIC + "', '" + Constants.INPUT_TEXT + "');\" value=\"" + Labels.MARKUP_ITALIC + "\" /> " +
            "<input type=\"button\" onclick=\"addMarkup('" + MARKUP_UNDERLINE + "', '" + Constants.INPUT_TEXT + "');\" value=\"" + Labels.MARKUP_UNDERLINE + "\" /> " +
            "<input type=\"button\" onclick=\"addMarkup('" + MARKUP_LIST + "', '" + Constants.INPUT_TEXT + "');\" value=\"" + Labels.MARKUP_LIST + "\" /> " +
            "<input type=\"button\" onclick=\"addMarkup('" + MARKUP_CODE + "', '" + Constants.INPUT_TEXT + "');\" value=\"" + Labels.MARKUP_CODE + "\" /> " +
            "<input type=\"button\" onclick=\"addMarkup('" + MARKUP_LINK + "', '" + Constants.INPUT_TEXT + "');\" value=\"" + Labels.MARKUP_LINK + "\" /> " +
            "<input type=\"button\" onclick=\"addMarkup('" + MARKUP_FILE + "', '" + Constants.INPUT_TEXT + "');\" value=\"" + Labels.MARKUP_FILE + "\" /> " +
            "<a href=\"http://nickel.codeplex.com/wikipage?title=Using%20Nickel:%20Markup\" target=\"_blank\" style=\"text-decoration:none;padding:0 3px 0 3px;\">?</a></div>";

        // Markup bar sans file
        public const string MARKUP_BAR_LITE = "<div id=\"markupBar\">" +
            "<input type=\"button\" onclick=\"addMarkup('" + MARKUP_BOLD + "', '###id###" + Constants.INPUT_TEXT + "');\" value=\"" + Labels.MARKUP_BOLD + "\" /> " +
            "<input type=\"button\" onclick=\"addMarkup('" + MARKUP_ITALIC + "', '###id###" + Constants.INPUT_TEXT + "');\" value=\"" + Labels.MARKUP_ITALIC + "\" /> " +
            "<input type=\"button\" onclick=\"addMarkup('" + MARKUP_UNDERLINE + "###id###', '" + Constants.INPUT_TEXT + "');\" value=\"" + Labels.MARKUP_UNDERLINE + "\" /> " +
            "<input type=\"button\" onclick=\"addMarkup('" + MARKUP_LIST + "', '###id###" + Constants.INPUT_TEXT + "');\" value=\"" + Labels.MARKUP_LIST + "\" /> " +
            "<input type=\"button\" onclick=\"addMarkup('" + MARKUP_CODE + "', '###id###" + Constants.INPUT_TEXT + "');\" value=\"" + Labels.MARKUP_CODE + "\" /> " +
            "<input type=\"button\" onclick=\"addMarkup('" + MARKUP_LINK + "', '###id###" + Constants.INPUT_TEXT + "');\" value=\"" + Labels.MARKUP_LINK + "\" /> " +
            "<a href=\"http://nickel.codeplex.com/wikipage?title=Using%20Nickel:%20Markup\" target=\"_blank\" style=\"text-decoration:none;padding:0 3px 0 3px;\">?</a></div>";

        // Markup types
        public const string MARKUP_BOLD = "b";
        public const string MARKUP_CODE = "code";
        public const string MARKUP_FILE = "file";
        public const string MARKUP_ITALIC = "i";
        public const string MARKUP_LINK = "link";
        public const string MARKUP_LIST = "list";
        public const string MARKUP_UNDERLINE = "u";

        // Upload bar
        public const string PROFILE_UPLOAD_BAR = "<form id=\"" + UPLOAD_FORM + "\" name=\"" + UPLOAD_FORM + "\" " +
            "action=\"###url###\" method=\"post\" " +
            "enctype=\"multipart/form-data\" target=\"" + UPLOAD_WINDOW + "\">" +
            "<div>" +
            "  <input type=\"hidden\" id=\"authorId\" name=\"authorId\" value=\"###authorId###\" />" +
            "  <input type=\"file\" class=\"uploadButton\" min=\"1\" max=\"10\" multiple id=\"" + INPUT_UPLOAD + "\" size=\"0\" name=\"" + INPUT_UPLOAD + "\" onchange=\"uploadFile();\" maxlength=\"256\" value=\"\" />" +
            "</div>" +
            "<div id=\"" + TARGET_UPLOAD + "\">###image###</div>" +
            "<iframe name=\"" + UPLOAD_WINDOW + "\" id=\"" + UPLOAD_WINDOW + "\" onload=\"onUpload();\"></iframe>" +
            "</form>";

        // Response div ID
        public const string RESPONSE_ID = "response";

        // Click source types
        public const string SOURCE_FORM = "form";
        public const string SOURCE_LINK = "link";
        public const string SOURCE_LINKS = "links";
        public const string SOURCE_LIST = "list";
        public const string SOURCE_LOAD = "load";

        // Write targets
        public const string TARGET_ARTICLES = "articles";
        public const string TARGET_BUFFER = "buffer";
        public const string TARGET_COMMENTS = "comments";
        public const string TARGET_COMMENT_COUNT = "commentCount";
        public const string TARGET_COMMENT_COUNT_ARTICLE = "commentCountArticle";
        public const string TARGET_COMMENT_FORM = "commentForm";
        public const string TARGET_COMMENT_ERROR = "commentError";
        public const string TARGET_CONTENT = "leftColumn";
        public const string TARGET_FORM_ERROR = "formError";
        public const string TARGET_LINK_ERROR = "linkError";
        public const string TARGET_LINKS = "links";
        public const string TARGET_LIST_ERROR = "listError";
        public const string TARGET_PAGE = "pagination";
        public const string TARGET_SEARCH_ERROR = "searchError";
        public const string TARGET_SUBSCRIBE = "subscribe";
        public const string TARGET_UPLOAD = "uploadedFile";

        // Form types
        public const string TYPE_ACTIVATE = "activate";
        public const string TYPE_ARTICLE = "article";
        public const string TYPE_AUTHOR_LIST = "authorList";
        public const string TYPE_COMMENT = "comment";
        public const string TYPE_ENCRYPT = "encrypt";
        public const string TYPE_FORGOT_PASSWORD = "forgotPassword";
        public const string TYPE_PROFILE = "profile";
        public const string TYPE_REGISTER = "register";
        public const string TYPE_SEARCH = "search";
        public const string TYPE_SIGN_IN = "signIn";
        public const string TYPE_SIGN_OUT = "signOut";
        public const string TYPE_SUBSCRIBE = "subscribe";
        public const string TYPE_TAGS = "tags";
        public const string TYPE_UPLOAD = "upload";

        // Upload bar
        public const string UPLOAD_BAR = "<form id=\"" + UPLOAD_FORM + "\" name=\"" + UPLOAD_FORM + "\" " +
            "action=\"###url###\" method=\"post\" " +
            "enctype=\"multipart/form-data\" target=\"" + UPLOAD_WINDOW + "\">" +
            "<div id=\"uploadInput\">" +
            "  <div id=\"uploadTitle\">Upload</div>" +
            "  <input type=\"file\" class=\"uploadButton\" min=\"1\" max=\"10\" multiple id=\"" + INPUT_UPLOAD + "\" size=\"0\" name=\"" + INPUT_UPLOAD + "\" onchange=\"uploadFile();\" maxlength=\"256\" value=\"\" />" +
            "</div>" +
            "<div id=\"" + TARGET_UPLOAD + "\"></div>" +
            "<iframe name=\"" + UPLOAD_WINDOW + "\" id=\"" + UPLOAD_WINDOW + "\" onload=\"onUpload();\"></iframe>" +
            "</form>";

        // Upload form name
        public const string UPLOAD_FILE_LIST = "fileList";
        public const string UPLOAD_FORM = "uploadForm";
        public const string UPLOAD_WINDOW = "uploadWindow";

    }

}
